﻿#pragma once

#include <atlimage.h>
#include "Game.h"
#include "GameBoard.h"

// 主窗口
class MainWindow: public CDialog {
    DECLARE_MESSAGE_MAP()

    private: GameBoard mGameBoard;      // 游戏区域
    private: Game* mGame;               // 游戏
    private: CImage mImage;             // 背景图片
    private: GameBoard mPreview;        // 预览区域
    private: CStatusBarCtrl mStatusBar; // 状态栏

    public: MainWindow(CWnd* parent = NULL);
    public: ~MainWindow();
    private: afx_msg void OnActivate(UINT, CWnd*, BOOL);
    private: afx_msg void OnButtonMusicClicked();
    private: afx_msg void OnButtonPauseClicked();
    private: afx_msg void OnButtonStartClicked();
    private: afx_msg HBRUSH OnCtlColor(CDC*, CWnd*, UINT);
    private: afx_msg LRESULT OnDifficultyUp(WPARAM, LPARAM lParam = 0);
    private: afx_msg LRESULT OnGameOver(WPARAM, LPARAM);
    private: virtual BOOL OnInitDialog();
    private: afx_msg void OnPaint();
    private: afx_msg LRESULT OnScore(WPARAM, LPARAM lParam = 0);
    private: afx_msg void OnTimer(UINT_PTR);
    private: virtual BOOL PreTranslateMessage(MSG*);
};
